<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<script type="text/javascript" charset="utf-8">
	function numberTest(){
		var num1 = window.parseInt("10");
		var num2 = parseInt("20");//윈동두는 생략가능
		alert(num1+num2);
		var num3 = window.parseFloat("20.2");
		var num4 = window.parseFloat("59.1");
		alert(num3+num4);
	}
	function isNaNTest(str){
		var flag = window.isNaN(str);//str이 숫자 형태 문자열인치 체크: true는 숫자형태가 아닐때
		alert(flag);
		if(!flag){
			alert(window.parseInt(str));
		}else{
			
			alert('숫자가 아닙니다');
		}
	}
</script>
</head>
<body>
<button onclick="numberTest();">numberTest()</button>
<button onclick="isNaNTest('200');">inNaNTest('200')</button>
<button onclick="isNaNTest('aaaa');">isNanTest2('aaaa')</button>
</body>
</html>